﻿using System;
using System.Collections.Generic;
using System.Text;
using Ebada.Platform.Model;
using Ebada.Client.Platform;
namespace Ebada.Modules.Vehicle
{
    class Vehicle_Common
    {
        /// <summary>
        /// 从数据字典添加内容到下拉列表
        /// </summary>
        /// <param name="DicTypeCode">字典类型代码</param>
        /// <param name="cobedit">下拉列表控件</param>
        public void Add_DIC(string DicTypeCode, DevExpress.XtraEditors.ComboBoxEdit cobedit)
        {
            string sql = "where DicTypeCode='" + DicTypeCode + "' and Enabled='1' order by DicItemCode";
            IList<Dictionarys> Dic_list = null;
            Dic_list = MainHelper.PlatformSqlMap.GetList<Dictionarys>(sql);
            cobedit.Properties.Items.Clear();
            foreach (Dictionarys temp_dic in Dic_list)
            {
                cobedit.Properties.Items.Add(temp_dic.DicItemCnName);
            }
        }
    }
}
